Skip to content

staticaddr: minor fixes #956

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 23, 2025
Merged

Conversation

hieblmi
Copy link
Collaborator

@hieblmi hieblmi commented Jun 16, 2025

depends on #954, ignore first commit

@hieblmi hieblmi force-pushed the minor-static-fixes branch from 5b287c8 to 9f7726a Compare June 16, 2025 09:53
@hieblmi hieblmi requested review from starius and sputn1ck June 16, 2025 10:27
@hieblmi hieblmi self-assigned this Jun 16, 2025
}
wg.Wait()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this commit makes sense. If we recover into the action waitforexpirysweptaction this recover will block until the tx is confirmed, making loop unusable for uncertain block times.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A solution would be to make the action non-blocking (e.g. by moving receiving from the notifiers into a goroutine and sending an event to the fsm)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the catch @sputn1ck. I removed this commit.

@hieblmi hieblmi force-pushed the minor-static-fixes branch from 9f7726a to 22266d6 Compare June 16, 2025 11:55
@hieblmi hieblmi requested a review from sputn1ck June 16, 2025 12:32
Copy link
Collaborator

@starius starius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Not sure if the second commit is needed.

if err != nil {
log.Errorf("Error sending OnStart event: %v",
err)
}

m.activeLoopIns[swapHash] = fsm
}()
}(fsm, loopIn.SwapHash)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed? fsm and swapHash are a local variable and they can't change outside of the goroutine.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loopIn is a iteration variable which might change before the goroutine launches, so this is needed.

@hieblmi hieblmi force-pushed the minor-static-fixes branch from 22266d6 to 80808b6 Compare June 23, 2025 08:36
@hieblmi hieblmi force-pushed the minor-static-fixes branch from 80808b6 to d526192 Compare June 23, 2025 09:00
@hieblmi hieblmi merged commit e145963 into lightninglabs:master Jun 23, 2025
4 checks passed
@hieblmi hieblmi deleted the minor-static-fixes branch June 23, 2025 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants